package com.cqc.mybatis01.dao;

import org.apache.ibatis.session.SqlSession;

import com.cqc.mybatis01.pojo.User;

public class UserDaoImpl implements UserDao {

	//传递sessionFactory
	private SqlSession session;
	public UserDaoImpl(SqlSession session) {
		super();
		this.session = session;
	}

	@Override
	public User findUserById(int id) {
		User user = session.selectOne("test.findUserById",1);
		return user;
	}

}
